package com.heima.service.impl;

import com.github.pagehelper.PageHelper;
import com.heima.dao.IOrdersDao;
import com.heima.domain.Orders;
import com.heima.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrdersServiceImpl implements OrdersService {
    @Autowired
    private IOrdersDao dao;
    @Override
    public List<Orders> findAll(Integer page,Integer pageSize) {
        PageHelper.startPage(page,pageSize);
        return dao.findAll();
    }

    @Override
    public Orders findById(String id) {
        return dao.findById(id);
    }
}
